<template>
	<div class="zd_yq">
		<!-- 队长 -->
		<div class="item_dz">
			<div
				class="item_barl"
				v-if="menudata.is_leader"
			>
				<span>北京亚成自助重庆石锅鱼拌饭</span>
			</div>
			<div class="item_dzs">
				<div class="item_dzss">
					<div class="dz_info">
						<img
							class="tx"
							:src="menudata.account_pic"
						>
						<div class="dz_mess">
							<div class="dz_name">
								<span style="color:orange">{{menudata.acount_name}}</span>
								<img
									class="qz"
									src="../../static/images/organize_team/dz.png"
									v-if="menudata.is_leader"
								>
							</div>
							<div
								class="dz_addcp"
								v-if="!menudata.is_finish"
							>
								<yd-button
									type="hollow"
									@click.native="add_goods"
								>添加商品</yd-button>
							</div>
						</div>
					</div>
					<div class="dz_cp">
						<yd-accordion>
							<yd-accordion-item title="查看已选商品">
								<div style="padding: .24rem;">
									<div
										class="c"
										v-for="(item,index) in  menudata.menus"
										:key="index"
									>
										<div class="cinfo">
											<span>{{item.menu_name}}</span>
											<span>x{{item.num}}</span>
										</div>
										<div>
											<span>￥{{item.price}}</span>
										</div>
									</div>
								</div>
							</yd-accordion-item>
						</yd-accordion>
					</div>
					<div class="dz_stati">
						<span>共{{menudata.total_num}}件</span>
						<span style="padding-left: 0.2rem;">小计:</span>
						<span class="js">￥{{menudata.total_price}}元</span>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
export default {
	name: "UserDetail",
	props: {
		business_id: {
			type: Number,
			default: 0
		},
		menudata: {
			type: Object,
			default: () => {
				return {
					// acount_name: '余生莫相离',
					// account_pic: require('@/static/images/organize_team/cf.png'),
					// is_leader: true,
					// is_finish:false,
					// menus: [{
					// 	menu_name: '清油鸳鸯锅底/牛油鸳鸯锅',
					// 	num: 1,
					// 	price: 58
					// },
					// {
					// 	menu_name: '肥牛1号',
					// 	num: 2,
					// 	price: 30
					// },
					// {
					// 	menu_name: '娃娃菜',
					// 	num: 1,
					// 	price: 22
					// },
					// ],
					// total_num: 3,
					// total_price: 235
				}
			}
		}
	},
	data () {
		return {}
	},
	components: {},
	methods: {

		/*
		* 添加商品
		* 作者：gzt
		* 时间：2019-12-02 21:33:17
		*/
		add_goods () {
			this.$router.push({
				name: 'shcp_detail',
				params: {
					id: this.business_id
				}
			})
		}
	}
}
</script>

<style lang="less" >
.zd_yq {
	padding: 0.3rem;
	margin-bottom: 0.3rem;
	background: #fff;
	margin: 0.3rem;
	border-radius: 10px;
}

/* .list_zd{
        margin-top: -1rem;
    } */

.yd-btn-block {
	margin-top: 0.2rem;
}
/* 队长 */
.item_dz {
	text-align: left;
}
.item_barl {
	font-size: 0.3rem;
	padding-bottom: 0.2rem;
	font-weight: bold;
	display: flex;
	justify-content: space-between;
}
.item_dzss {
	font-size: 0.25rem;
}
.dz_info {
	display: flex;
	font-size: 0.3rem;
}
.tx {
	height: 0.8rem;
	width: 0.8rem;
	border-radius: 180px;
}
.dz_mess {
	flex: 1;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-left: 0.2rem;
	border-bottom: 1px solid #f5f5f5;
}
.dz_name {
	display: flex;
	align-items: center;
}
.dz_name span {
	margin-right: 0.2rem;
}
.qz {
	height: 0.4rem;
	width: 0.4rem;
}
.bs {
	border: 1px solid orange;
	font-size: 0.2rem;
	padding: 0px 2px;
	color: orange;
}
.dy {
	border: 1px solid limegreen;
	font-size: 0.2rem;
	padding: 0px 2px;
	color: limegreen;
}
.yd-btn-hollow {
	border: 1px solid orange;
}
.yd-btn {
	height: 0.5rem;
}
.dz_cp {
	padding-left: 0.72rem;
}
.dz_stati {
	font-size: 0.3rem;
	display: flex;
	padding-top: 0.15rem;
	align-items: center;
	justify-content: flex-end;
}
.js {
	font-size: 0.33rem;
	color: red;
}
.c {
	display: flex;
	font-size: 0.28rem;
	justify-content: space-between;
}
.cinfo {
	display: flex;
	flex: 1;
	padding-right: 0.2rem;
	justify-content: space-between;
}
/* 组员 */
.item_zy {
	margin-top: 0.3rem;
}
</style>
